﻿using System;
using System.Collections.Generic;
using System.Text;
using TTServer.Objects;

using libReadWrite;
using libCommonClass;

namespace TTServer.Messages
{
    public class ScreenSizeResponseMessage : TTMessage
    {
        private int _width;
        private int _height;

        public ScreenSizeResponseMessage(int width, int height)
        {
            this._width = width;
            this._height = height;
        }

        public ScreenSizeResponseMessage()
        {
            
        }

        public override void ReadMessage(BigEndianReader sr)
        {
            throw new NotImplementedException();
        }

        public override void WriteMessage(BigEndianWriter sw)
        {
            sw.Write((byte)MessageKind.SCREEN_SIZE_RESPONSE);
            sw.Write(Global.NO_LENGTH_CODE);

            sw.Write(_width);
            sw.Write(_height);
            
        }

        public override TTMessage Clone()
        {
            return new ScreenSizeResponseMessage();
        }

        public override int GetMessageID()
        {
            return MessageKind.SCREEN_SIZE_RESPONSE;
        }

        public override string GetMessageName()
        {
            return "ScreenSizeResponseMessage";
        }
    }
}
